import { SET_MOVE_AND_ZOOM, UPDATE_SUBMIT_DATA } from './action';

export const reducer = (state, action) => {
    switch (action.type) {
        case SET_MOVE_AND_ZOOM:
            return { ...state, disableMoveAndZoom: action.payload };
        case UPDATE_SUBMIT_DATA: // 当前组织结构树添加的节点, 提供给子节点计算使用, 例如在新增公司时候计算排序号
            return { ...state, submitData: action.payload };
        default:
            return state;
    }
};
